package org.example.traffic.organizationadmin;

import org.example.traffic.organization.Organization;
import org.example.traffic.organizationadmin.OrganizationAdmin;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface OrganizationAdminRepository extends JpaRepository<OrganizationAdmin, Integer> {
    // 根据用户名查找组织管理员
    OrganizationAdmin findByUsername(String username);

    // 分页查询所有视频
    Page<OrganizationAdmin> findAll(Pageable pageable);

    // 根据用户名模糊查询（忽略大小写）
    Page<OrganizationAdmin> findByUsernameContainingIgnoreCase(String username, Pageable pageable);
}
